<h1>Logs by user</h1>

<ul>
  <% for user in @users %>
  <li><%= link_to user.login, user_url(user) %>
  (<%= pluralize user.blogs.size, 'blog' %>, <%= pluralize user.articles.size, 'article' %>)
  <% if logged_in? && (current_user == user || current_user.login == 'admin') %>
  , <%= link_to 'Edit', edit_user_path(user) %>
  | <%= link_to 'Delete', user_path(user), :confirm => 'Are you sure?', :method => :delete, :href => delete_user_url(user) %>
  <% end %>
  </li>
  <% end %>
</ul>
